<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2018/10/20
 * Time: 17:26
 */
header("content-type:text/html;charset=utf-8");
require COMMON_PATH.'logTool.class.php';
require COMMON_PATH.'message.class.php';
class HomePageAction
{
    //获取首页设置信息
    public function getInfo(){
        $back = null;
        $info = M('home_page');
        $data = $info->find();
        if ($data) {
            $msg = array(
                'phone' => $data['phone'],
                'address' => $data['address'],
                'pic_url' => $data['pic_url']
            );
            $back = message::success('success',$msg);
        } else {
            $back = message::fail('未获取到有效信息');
        }
        logTool::logCat('前台获取首页信息：'.$back);
        echo $back;
        return;
    }
}